<?php
class DomArManyToManyListener extends DomArObject {
	
	/**
	 * @orm has many DomArManyToManyListener inverse parent setValidatorChild()
	 * @orm listener beforeAdd beforeAddChild(2)
	 * @orm listener afterAdd afterAddChild(3)
	 * @orm listener beforeRemove beforeRemoveChild(4)
	 * @orm listener afterRemove afterRemoveChild(5)
	 */
	public $items;
	
	/**
	 * @orm has parents DomArManyToManyListener inverse items setValidatorParent()
	 * @orm listener beforeAdd beforeAddParent(6)
	 * @orm listener afterAdd afterAddParent(7)
	 * @orm listener beforeRemove beforeRemoveParent(8)
	 * @orm listener afterRemove afterRemoveParent(9)
	 */
	public $parent;
	
	public $setValidatorChild;
	public $beforeAddChild;
	public $afterAddChild;
	public $beforeRemoveChild;
	public $afterRemoveChild;
	
	public $setValidatorParent;
	public $beforeAddParent;
	public $afterAddParent;
	public $beforeRemoveParent;
	public $afterRemoveParent;
	
	public $setValidatorChildCount;
	public $beforeAddChildCount;
	public $afterAddChildCount;
	public $beforeRemoveChildCount;
	public $afterRemoveChildCount;
	
	public $setValidatorParentCount;
	public $beforeAddParentCount;
	public $afterAddParentCount;
	public $beforeRemoveParentCount;
	public $afterRemoveParentCount;
	
	public function reset() {
		$this->setValidatorChild = 1;
		$this->beforeAddChild = 1;
		$this->afterAddChild = 1;
		$this->beforeRemoveChild = 1;
		$this->afterRemoveChild = 1;
		
		$this->setValidatorParent = 1;
		$this->beforeAddParent = 1;
		$this->afterAddParent = 1;
		$this->beforeRemoveParent = 1;
		$this->afterRemoveParent = 1;
		
		$this->setValidatorChildCount = 0;
		$this->beforeAddChildCount = 0;
		$this->afterAddChildCount = 0;
		$this->beforeRemoveChildCount = 0;
		$this->afterRemoveChildCount = 0;
		
		$this->setValidatorParentCount = 0;
		$this->beforeAddParentCount = 0;
		$this->afterAddParentCount = 0;
		$this->beforeRemoveParentCount = 0;
		$this->afterRemoveParentCount = 0;
	}
	
	public function setValidatorChild( $value ) {
		$this->setValidatorChild = 0; 
		$this->setValidatorChildCount++;
		return 0;
	}
	
	public function beforeAddChild( $value, $arg ) {
		$this->beforeAddChild = $arg == 2 ? 0 : 2; 
		$this->beforeAddChildCount++;
	}
	
	public function afterAddChild( $value, $arg ) {
		$this->afterAddChild = $arg == 3 ? 0 : 2; 
		$this->afterAddChildCount++;
	}
	
	public function beforeRemoveChild( $value, $arg ) {
		$this->beforeRemoveChild = $arg == 4 ? 0 : 2; 
		$this->beforeRemoveChildCount++;
	}
	
	public function afterRemoveChild( $value, $arg ) {
		$this->afterRemoveChild = $arg == 5 ? 0 : 2; 
		$this->afterRemoveChildCount++;
	}
	
	
	
	public function setValidatorParent( $value ) {
		$this->setValidatorParent = 0; 
		$this->setValidatorParentCount++;
		return 0;
	}
	
	public function beforeAddParent( $value, $arg ) {
		$this->beforeAddParent = $arg == 6 ? 0 : 2; 
		$this->beforeAddParentCount++;
	}
	
	public function afterAddParent( $value, $arg ) {
		$this->afterAddParent = $arg == 7 ? 0 : 2; 
		$this->afterAddParentCount++;
	}
	
	public function beforeRemoveParent( $value, $arg ) {
		$this->beforeRemoveParent = $arg == 8 ? 0 : 2; 
		$this->beforeRemoveParentCount++;
	}
	
	public function afterRemoveParent( $value, $arg ) {
		$this->afterRemoveParent = $arg == 9 ? 0 : 2; 
		$this->afterRemoveParentCount++;
	}
	


}
?>